﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GA.Shared.Interfaces;
using System.Windows;
using System.Runtime.Serialization;
using System.Windows.Data;

namespace GA.Shared.Objects
{
    public class Rarity : LinkedDependencyObject
    {
        /// <summary>
        /// Identifies the Id Property.
        /// </summary>
        public static readonly DependencyProperty IdProperty =
            RegisterProperty(
                "Id",
                typeof(int),
                typeof(Rarity),
                new PropertyMetadata(-1));

        /// <summary>
        /// Identifies the Name Property.
        /// </summary>
        public static readonly DependencyProperty NameProperty =
            RegisterProperty(
                "Name",
                typeof(string),
                typeof(Rarity),
                new PropertyMetadata(string.Empty));

        /// <summary>
        /// Identifies the Red Property.
        /// </summary>
        public static readonly DependencyProperty RedProperty =
            RegisterProperty(
                "Red",
                typeof(int),
                typeof(Rarity),
                new PropertyMetadata(0));

        /// <summary>
        /// Identifies the Green Property.
        /// </summary>
        public static readonly DependencyProperty GreenProperty =
            RegisterProperty(
                "Green",
                typeof(int),
                typeof(Rarity),
                new PropertyMetadata(0));

        /// <summary>
        /// Identifies the Blue Property.
        /// </summary>
        public static readonly DependencyProperty BlueProperty =
            RegisterProperty(
                "Blue",
                typeof(int),
                typeof(Rarity),
                new PropertyMetadata(0));

        /// <summary>
        /// Gets or sets the Id.
        /// </summary>
        
        public int Id
        {
            get { return (int)SafeGetValue(IdProperty); }
            set { SafeSetValue(IdProperty, value); }
        }

        /// <summary>
        /// Gets or sets the Name.
        /// </summary>
        
        public string Name
        {
            get { return (string)SafeGetValue(NameProperty); }
            set { SafeSetValue(NameProperty, value); }
        }

        /// <summary>
        /// Gets or sets the Red Value.
        /// </summary>
        
        public int Red
        {
            get { return (int)SafeGetValue(RedProperty); }
            set { SafeSetValue(RedProperty, value); }
        }

        /// <summary>
        /// Gets or sets the Green Value.
        /// </summary>
        
        public int Green
        {
            get { return (int)SafeGetValue(GreenProperty); }
            set { SafeSetValue(GreenProperty, value); }
        }

        /// <summary>
        /// Gets or sets the Blue Value.
        /// </summary>
        
        public int Blue
        {
            get { return (int)SafeGetValue(BlueProperty); }
            set { SafeSetValue(BlueProperty, value); }
        }

        public Rarity()
        {
        }

        public Rarity(LinkedDependencyObject baseObject)
            : base(baseObject)
        {
        }

        public Rarity(LinkedDependencyObject baseObject, BindingMode bindingMode)
            : base(baseObject, bindingMode)
        {
        }
    }
}
